﻿<!DOCTYPE html>

<html>
<head>
    <title></title>
    <script src="jquery-2.1.1.min.js"></script>
    <script type="text/javascript">
        function removeItem(obj) {
            $(obj).parent().remove();
        }

        function addItem(obj) {
            var values = "<div><select><option value='0'>Bubble</option><option value='1'>Insert</option><option value='2'>Shell</option><option value='3'>Heap</option><option value='4'>Merge</option><option value='5'>Quick</option><option value='6'>Radix</option><option value='7'>Count</option></select><button onclick='removeItem(this)'>Remove</button></div>";
            $(obj).parent().append($(values));
        }

        $(function () {
            //$("body").children().each(function (i, obj) {
            //    $(obj).find("input,select").last().blur(function () {
            //        alert(123);
            //    })
            //});
            $('form').change(function () {
                alert(123);
            });
        });
    </script>
</head>
<body>
    <div id="d1"><form><h3>Runtime(SortRuntimeOptions)</h3><p><span>ArrayLength:</span><input /><i>Int32</i></p><p><span>MinValue:</span><input /><i>Int32</i></p><p><span>MaxValue:</span><input /><i>Int32</i></p><p><span>Iteration:</span><input /><i>Int32</i></p><p><span>Timeout:</span><input /><i>Int32</i></p><p><span>Seed:</span><input /><i>Int32</i></p></form></div>
    
    <div><span>Methods: <i>SortMethod</i></span><button onclick="addItem(this)">Add New</button>
        <div>
            <select><option value='0'>Bubble</option><option value='1'>Insert</option><option value='2'>Shell</option><option value='3'>Heap</option><option value='4'>Merge</option><option value='5'>Quick</option><option value='6'>Radix</option><option value='7'>Count</option></select>
            <button onclick="removeItem(this)">Remove</button>
        </div>
    </div>

    <p><button>Submit</button></p>
</body>
</html>